package com.sh.cloudrender.domian.entity;

import io.kubernetes.client.openapi.models.V1ObjectMeta;

public class TraefikMiddleware {
    private String apiVersion;
    private String kind;
    private V1ObjectMeta metadata;
    private Spec spec;

    public String getApiVersion() {
        return apiVersion;
    }

    public void setApiVersion(String apiVersion) {
        this.apiVersion = apiVersion;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public V1ObjectMeta getMetadata() {
        return metadata;
    }

    public void setMetadata(V1ObjectMeta metadata) {
        this.metadata = metadata;
    }

    public Spec getSpec() {
        return spec;
    }

    public void setSpec(Spec spec) {
        this.spec = spec;
    }

    // Inner classes

    public static class Spec {
        private ReplacePathRegex replacePathRegex;
        private Headers headers;

        public ReplacePathRegex getReplacePathRegex() {
            return replacePathRegex;
        }

        public void setReplacePathRegex(ReplacePathRegex replacePathRegex) {
            this.replacePathRegex = replacePathRegex;
        }

        public Headers getHeaders() {
            return headers;
        }

        public void setHeaders(Headers headers) {
            this.headers = headers;
        }
    }

    public static class ReplacePathRegex {
        private String regex;
        private String replacement;

        public String getRegex() {
            return regex;
        }

        public void setRegex(String regex) {
            this.regex = regex;
        }

        public String getReplacement() {
            return replacement;
        }

        public void setReplacement(String replacement) {
            this.replacement = replacement;
        }
    }

    public static class Headers {
        private CustomRequestHeaders customRequestHeaders;

        public CustomRequestHeaders getCustomRequestHeaders() {
            return customRequestHeaders;
        }

        public void setCustomRequestHeaders(CustomRequestHeaders customRequestHeaders) {
            this.customRequestHeaders = customRequestHeaders;
        }
    }

    public static class CustomRequestHeaders {
        private String host;

        public String getHost() {
            return host;
        }

        public void setHost(String host) {
            this.host = host;
        }
    }
}
